clear all
cd "INSERT FILE DIRECTORY NAME"

use DalEtAll_MCW2025.dta


*Table 1*
sutex sosmedguven exposeviol devletkoruma female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest, digits(3) lab nobs minmax title("Summary statistics")


svyset id [pweight= wsett], strata(bolge)
*Table 2*
eststo m1: svy: reg sosmedguven exposeviol
eststo m2: svy: reg sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban    
eststo m3: svy: reg sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban age newspaper tvchan socmedia
eststo m4: svy: reg sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest
eststo m5: svy: reg sosmedguven exposeviol devletkoruma inter
eststo m6: svy: reg sosmedguven exposeviol devletkoruma inter female age education jobseeker publicempoy religiosity urban
eststo m7: svy: reg sosmedguven exposeviol devletkoruma inter female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia
eststo m8: svy: reg sosmedguven exposeviol devletkoruma inter female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest 
esttab m1 m2 m3 m4 m5 m6 m7 m8 using "Table1.tex", tex replace b(%10.3f) se scalars("r2 \$R^2\$") label starlevels(* 0.05 ** 0.01 *** 0.001) varlabels(_cons Constant)

*Figure 2*
svy: reg sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest
margins, at(exposeviol =(0 1)) vsquish
marginsplot, x(exposeviol) recast(line) xlabel(0 1) level(95) 
svy: reg sosmedguven exposeviol##devletkoruma female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest 
margins, at(devletkoruma=(0 1) exposeviol =(0 1)) vsquish
marginsplot, x(exposeviol) recast(line) xlabel(0 1) level(95) 


*Online Appendix*

*Appendix B. Coorelation Matrix
corr exposeviol devletkoruma female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest

*Appendix E.
eststo m1: svy: ologit sosmedguven exposeviol
eststo m2: svy: ologit sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban    
eststo m3: svy: ologit sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban age newspaper tvchan socmedia
eststo m4: svy: ologit sosmedguven exposeviol female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest
eststo m5: svy: ologit sosmedguven exposeviol devletkoruma inter
eststo m6: svy: ologit sosmedguven exposeviol devletkoruma inter female age education jobseeker publicempoy religiosity urban
eststo m7: svy: ologit sosmedguven exposeviol devletkoruma inter female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia
eststo m8: svy: ologit sosmedguven exposeviol devletkoruma inter female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest 
esttab m1 m2 m3 m4 m5 m6 m7 m8 using "Table_A.tex", tex replace b(%10.3f) se scalars("aic AIC \$R^2\$" "ll Log-Likelihood") label starlevels(* 0.05 ** 0.01 *** 0.001) varlabels(_cons Constant)

*Appendix F*
*Gerekirse*
recode lowPKKeffectonstate (99=.), gen(measure1)
recode lowPKKeffectonKurds (99=.), gen(measure2)
recode lowConfResProb (99=.), gen(measure3)
factor measure1 measure2 measure3, pcf
rotate, varimax
predict devkor

svyset id [pweight= wsett], strata(bolge)
eststo m1:svy: reg sosmedguven c.exposeviol##c.devkor 
eststo m2:svy: reg sosmedguven c.exposeviol##c.devkor female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest 
eststo m3:svy: ologit sosmedguven c.exposeviol##c.devkor 
eststo m4:svy: ologit sosmedguven c.exposeviol##c.devkor female age education jobseeker publicempoy religiosity urban newspaper tvchan socmedia kurd cumhurfeel polinterest 
esttab m1 m2 m3 m4 using "TableMain.tex", tex replace b(%10.3f) se scalars("r2 \$R^2\$" "aic AIC" "ll Log-Likelihood") label starlevels(* 0.05 ** 0.01 *** 0.001) varlabels(_cons Constant)
